Quaqua 4.4.7 2008-07-16

ch.randelshofer.quaqua.util
Class InactivatableColorUIResource

java.lang.Object
  extended by java.awt.Color
      extended by ch.randelshofer.quaqua.util.InactivatableColorUIResource
All Implemented Interfaces:
java.awt.Paint, java.awt.Transparency, java.io.Serializable

public class InactivatableColorUIResource
extends java.awt.Color

InactivatableColorUIResource is a color, that can be rendered using an an active state and an inactive state.

Version:
1.0.1 2007-11-11 We need to override method createContext as well.
1.0 January 16, 2007 Created.
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.Color
black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOW
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
InactivatableColorUIResource(int activeRGB, int inactiveRGB)
          Creates a new instance.
InactivatableColorUIResource(int activeRGB, int inactiveRGB, boolean hasAlpha)
           
 
Method Summary
 java.awt.PaintContext createContext(java.awt.image.ColorModel cm, java.awt.Rectangle r, java.awt.geom.Rectangle2D r2d, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)
           
 int getRGB()
           
 void setActive(boolean newValue)
           
 
Methods inherited from class java.awt.Color
brighter, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InactivatableColorUIResource

public InactivatableColorUIResource(int activeRGB,
                                    int inactiveRGB)
Creates a new instance.


InactivatableColorUIResource

public InactivatableColorUIResource(int activeRGB,
                                    int inactiveRGB,
                                    boolean hasAlpha)
Method Detail

setActive

public void setActive(boolean newValue)

getRGB

public int getRGB()
Overrides:
getRGB in class java.awt.Color

createContext

public java.awt.PaintContext createContext(java.awt.image.ColorModel cm,
                                           java.awt.Rectangle r,
                                           java.awt.geom.Rectangle2D r2d,
                                           java.awt.geom.AffineTransform xform,
                                           java.awt.RenderingHints hints)
Specified by:
createContext in interface java.awt.Paint
Overrides:
createContext in class java.awt.Color

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.